//
//  ShopCellFootView.m
//  FKGW
//
//  Created by song ce on 2017/3/13.
//  Copyright © 2017年 song ce. All rights reserved.
//

#import "ShopCellFootView.h"
#import "LookAllViewController.h"
#import "BaseNavigationViewController.h"
@implementation ShopCellFootView
- (void)awakeFromNib {
    [super awakeFromNib];
    self.contentView.backgroundColor = [UIColor whiteColor];
    
}

-(void)setModel:(ShopCellGroup *)model{
    _model = model;
}

- (IBAction)lookAllBtn:(UIButton *)sender {
    LookAllViewController  *shopDetail = [[LookAllViewController alloc]init];
    shopDetail.vcName = _model.markettype;
    shopDetail.hidesBottomBarWhenPushed = YES;
    shopDetail.markettypeid = _model.markettypeid;
    [[self secondNavigationController] pushViewController:shopDetail animated:YES];
}

- (BaseNavigationViewController*)secondNavigationController{
    UIResponder *next = self.nextResponder;
    while (next!=nil) {
        if([next isKindOfClass:[BaseNavigationViewController class]]){
            return (BaseNavigationViewController*)next;
        }
        next = next.nextResponder;
    }
    return nil;
}


@end
